/**
 * @Description:
 * @Author bianpengfei
 * @create 2021/3/24 21:43
 */
import Vue from 'vue'
import ElementUI, { Message } from 'element-ui'
import '../../style/element-ui/index.scss'

export default {
  install: (app) => {
    app.use(ElementUI, { size: 'small', zIndex: 3000 })
    app.prototype.$message = {
      ...Vue.prototype.$message,
      loading: (msg = '正在加载中...') => {
        return Message({
          dangerouslyUseHTMLString: true,
          message: `<div class="el-message--loading"><i class="iconfont-pc bpf-icon-ios-loading"></i><span>${msg}</span></div>`,
          duration: 0
        })
      }
    }
  }
}
